<?

define("ACT",1);
require_once './include/train_db.php';

/*<div class="blockSteal">
							<div class="title"><a href="#">Jobs</a></div>
						</div>*/
$status = $_SESSION['status'];
//BEGIN:add by dongbingxu for "REMOVE the link to Find Recruiter, Find Advisor, Find Chats.  Will no longer have access " on 2011-05-31
$fileName = trim(substr($_SERVER['SCRIPT_NAME'], strripos($_SERVER['SCRIPT_NAME'], '/')),'/');
//END:add by dongbingxu for "REMOVE the link to Find Recruiter, Find Advisor, Find Chats.  Will no longer have access " on 2011-05-31
switch($_SESSION[usertype]){
    case employer:
		$leftbutton = '<div class="user_panel" id="J_sysmenu">
							<div class="sysmenu_title mt_10"><h2 class="title"><a href="employerlist.php">My Desktop</a></div>
							<div class="sysmenu">
								<dl class="menu-wrap">
									<dt class="collapser"><span class="i-indicator"></span>Jobs<b></b></dt>
									<dd>
										<ul class="menubar">
											'. ('Trial' == $status?'':'<li class="menuitem"><a href="postjob.php">Post a Job</a></li><ul class="menubar disc"><li class="menusubitem"><a href="postjob_q.php">Quick</a></li><li class="menusubitem"><a href="postjob.php">Long Form</a></li></ul>').'
											

											<li class="menuitem"><a href="mypostjobs.php">My Jobs</a></li>	
										</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span>Resources<b></b></dt>
									<dd>
										<ul class="menubar">
												<li class="menuitem"><a href="findwebinars.php">Find Webinars</a></li>
												';
												if('candidatelist.php' != $fileName)
												{
													$leftbutton .= 'Trial' == $status ? '' : '<li class="menuitem"><a href="findadvisor.php">Find Advisor</a></li>';
												}
												$leftbutton .= '<li class="menuitem"><a href="googlesearch.php">Web Search</a></li>';								
												if('candidatelist.php' != $fileName)
												{
													$leftbutton .= 'Trial' != $status && 'Standard' != $status ? '<li class="menuitem"><a href="findchats.php">Find Chats</a></li>' : '';
												}								
												$leftbutton .= '<li class="menuitem"><a href="timeandcurrency.php">Time / Currency</a></li>';

									$leftbutton .= 	'</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span><a target="_blank" href="http://www.linkedin.com/groups?home=&gid=1777307&trk=anet_ug_hm">Community</a></dt>';
      break;
    case candidate:
		$leftbutton =  '<div class="user_panel" id="J_sysmenu">
							<div class="sysmenu_title mt_10"><h2 class="title"><a href="candidatelist.php">My Desktop</a></h2></div>
							<div class="sysmenu">
								<dl class="menu-wrap">
									<dt class="collapser"><span class="i-indicator"></span>My Resume<b></b></dt>
									<dd>
										<ul class="menubar">
											<li class="menuitem"><a href="postresume.php">Post Resume</a></li>
											<li class="menuitem"><a href="jobsapplied.php">Jobs Applied</a></li>	
										</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span>Resources<b></b></dt>
									<dd>
										<ul class="menubar">
											<li class="menuitem"><a href="findjob.php">Find Job</a></li>
											<li class="menuitem"><a href="findwebinars.php">Find Webinars</a></li>
											<li class="menuitem"><a href="googlesearch.php">Web Search</a></li>		
											<li class="menuitem"><a href="timeandcurrency.php">Time / Currency</a></li>	
										</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span><a target="_blank" href="http://www.linkedin.com/groups?home=&gid=1777307&trk=anet_ug_hm">Community</a></dt>
						';

      break;
    case recruiter:

		$sql_inbox = " SELECT COUNT(*) as count FROM pa_email WHERE `e_receivedrcid`='".$_SESSION[uid]."' AND e_receiverdel= 0 AND e_isread = 0";
		$mail_inbox = $DB->fetch_one_array($sql_inbox);
		if($mail_inbox['count'] > 0){
			$countInbox = '(<b>'.$mail_inbox['count'].'</b>)';
		}

		//$sql_sent = " SELECT COUNT(*) as count FROM pa_email WHERE `e_sentrcid`='".$_SESSION[uid]."' AND e_senderdel = 0 ";
		//$mail_sent = $DB->fetch_one_array($sql_sent);

		$leftbutton = '
						<div class="user_panel" id="J_sysmenu">
							<div class="sysmenu_title mt_10"><h2 class="title"><a href="rec_home.php">Network</a></h2></div>
							<div class="sysmenu">
							<dl class="menu-wrap">								
								<dd>
									<ul class="menubar">
										<li class="menuitem"><a href="findjob.php">Jobs</a></li>
										<li class="menuitem"><a href="findresume.php">Resumes</a></li>
									</ul>
								</dd>								
							</dl>
							</div>
							<div class="sysmenu_title mt_10"><h2 class="title"><a href="recdashboard.php">My Dashboard</a></h2></div>
							<div class="sysmenu">
								<dl class="menu-wrap">
									<dt class="collapser"><span class="i-indicator"></span>Messages<b></b></dt>
									<dd>
										<ul class="menubar">
											<li class="menuitem">' ;
							$leftbutton .=  '<a href="sendemail.php">New</a></li>';
											//('Trial' == $status ? '<a href="###" onclick="return $.fancybox({\'href\':\'#inline1\',\'titlePosition\':\'inside\',\'transitionIn\': \'none\',\'transitionOut\':\'none\'});">' : '<a href="sendemail.php">') . 'New</a></li>
							$leftbutton .= 	'<li class="menuitem"><a href="myemails.php?op_folder=1">Inbox'."&nbsp;".$countInbox.'</a></li>
											<li class="menuitem"><a href="myemails.php">Sent</a></li>
										</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span>Contacts <b></b></dt>
									<dd class="">
										<ul class="menubar">
											<li class="menuitem"><a href="postcontact.php">Add a Contact</a></li>
											<li class="menuitem"><a href="mycontacts.php">My Contacts</a></li>' ;
							$leftbutton .= 	('Premium' == $status) ? '<li class="menuitem"><a href="groups.php">Groups</a></li>':'';

							$leftbutton .='</ul>
									</dd>
									<dt class="collapser"><span class="i-indicator"></span>Jobs <b></b></dt>
									<dd class="">
										<ul class="menubar">
											<li class="menuitem"><a href="postjob.php">Add a Job</a></li>
											<ul class="menubar disc"><li class="menusubitem"><a href="postjob_q.php">Quick Add</a></li><li class="menusubitem"><a href="postjob.php">Long Form</a></li></ul>
											<li class="menuitem"><a href="myjobs.php">My Jobs</a></li>
											<li class="menuitem"><a href="mycontactjobs.php">Approve to Submit</a></li>
											<li class="menuitem"><a href="mysubmitjobs.php">Submitted Jobs</a></li>
										</ul>
									</dd>
									<dt class="collapser close"><span class="i-indicator"></span>Candidates <b></b></dt>
									<dd class="">
										<ul class="menubar">
											<li class="menuitem"><a href="postresume.php">Add a Candidate</a></li>
											<li class="menuitem"><a href="mycandidates.php">My Candidates</a></li>
											<li class="menuitem"><a href="mysubmitted.php">Submitted Candidates</a></li>
										</ul>
									</dd>
						';
			if('candidatelist.php' != $fileName && 'Premium' == $status)
			{
				$leftbutton .= '<dt class="collapser"><span class="i-indicator"></span>Chats <b></b></dt>
								<dd class="">
									<ul class="menubar">
										<li class="menuitem"><a href="findchats.php">Find Chats</a></li>
									</ul>
								</dd>';
		}
		if('Premium' == $status) {
			$leftbutton .= '<dt class="collapser"><span class="i-indicator"></span>Webinars<b></b></dt>
								<dd class="">
									<ul class="menubar">
										<li class="menuitem"><a href="postwebinar.php">Add a Webinar</a></li>
									</ul>
									<ul class="menubar">
										<li class="menuitem"><a href="mywebinars.php">My Webinars</a></li>
									</ul>
									<ul class="menubar">
										<li class="menuitem"><a href="findwebinars.php">Find Webinars</a></li>
									</ul>
								</dd>';
			}
			$leftbutton .= '	<dt class="collapser"><span class="i-indicator"></span>Resources <b></b></dt>
								<dd class="">
									<ul class="menubar">
										<li class="menuitem"><a href="findrecruiter.php">Find Recruiter</a></li>';
			if('Trial' == $status){
				$leftbutton		.=			'<li class="menuitem"><a href="###" onclick="return $.fancybox({\'href\':\'#inline1\',\'titlePosition\':\'inside\',\'transitionIn\': \'none\',\'transitionOut\':\'none\'});">Find Advisor</a></li>
				';
			}else{
				$leftbutton	.=				'<li class="menuitem"><a href="findadvisor.php">Find Advisor</a></li>
											';
			}
			$leftbutton .= '			<li class="menuitem"><a href="findwebinars.php">Find Webinars</a></li>
										<li class="menuitem"><a href="googlesearch.php">Web Search</a></li>	
										<li class="menuitem"><a href="timeandcurrency.php">Time / Currency</a></li>
										<li class="menuitem"><a href="tools.php">Tools</a></li>
									</ul>
								</dd>
						';						
      break;
     case advisor:
		$leftbutton = '<div class="blockOrange">
							<div class="title"><a href="advisorlist.php">My Desktop</a></div>
						</div>
						<div class="blockSteal">
							<div class="title"><a href="postresume.php">My Resume</a></div>
						</div>
						<div class="blockSteal">
							<div class="title2">My Chats</div>
							<div class="content">
									<ul>';
		if('candidatelist.php' != $fileName  && 'Trial' != $status && 'Standard' != $status)
		{
			$leftbutton .= '<li><a href="findchats.php">Find Chats</a></li>';
		}
		$leftbutton .= '<li><a href="mychats.php">Create Chats</a></li>
									</ul>
							</div>
						</div>
						<div class="blockSteal">
						<div class="title2">Resources</div>
						<div class="content">
								<ul>
								    <li><a href="findjob.php">Find Job</a></li>';
		if('candidatelist.php' != $fileName)
		{
			$leftbutton .= 'Trial' == $status ? '' : '<li><a href="findrecruiter.php">Find Recruiter</a></li>
									<li><a href="findadvisor.php">Find Advisor</a></li>';
		}
		$leftbutton .= ' <li><a href="googlesearch.php">Find Company</a></li>
									<li><a href="timeandcurrency.php">Time / Currency</a></li>
									<li><a href="tools.php">Tools</a></li>
								</ul>
							</div>
						</div>';	
		$leftbutton .= '<div class="blockSteal">
							<div class="title2">Webinars</div>
							<div class="content">
									<ul>
										<li><a href="postwebinar.php">Add a Webinar</a></li>
										<li><a href="mywebinars.php">My Webinars</a></li>
										<li><a href="findwebinars.php">Find Webinars</a></li>
									</ul>
							</div>
						</div>';
						
      break;


}



$smarty->assign("leftbutton",$leftbutton);


if(!empty($_POST[offset]))
{$offset = $_POST[offset];}
else if  (!empty($_GET[offset]))
{$offset = $_GET[offset]; }
else  {$offset = 0; }

//										<li><a href="mychats.php">Create Chats</a></li>

?>